//
//  CYPersonReCell.m
//  CreditAddressBook
//
//  Created by Mosu&Cuu on 16/1/19.
//  Copyright © 2016年 Lee. All rights reserved.
//

#import "CYPersonReCell.h"
#import "UIImageView+WebCache.h"
#import "CYURL.h"

@implementation CYPersonReCell

-(void) setModel:(CYPersonReModel *)model{

//    [self.headImageView sd_setImageWithURL:[NSURL URLWithString:[CYSTATICPATHBASIC stringByAppendingString:defr.headPic]] placeholderImage:[UIImage imageNamed:@"putao_icon_quick_replace_s"]];
    //NSString *price = @"保密";
    [self.headimageview sd_setImageWithURL:CYURLWithService(model.photo) placeholderImage:[UIImage imageWithName:@"icon_default_laolai"]];
    self.namelabel.text = [NSString stringWithFormat:@"姓名:%@",model.name];
    self.cerlabel.text = [NSString stringWithFormat:@"身份证号:%@",model.certificateNo];
    self.phonelabel.text = [NSString stringWithFormat:@"电话号码:%@",model.phone];
    if (model.qq) {
        self.pricelabel.text = [NSString stringWithFormat:@"qq号码:%@",model.qq];
    }else{
        self.pricelabel.text = @"qq号码:无";
    }
    
    self.timelabel.text = [NSString stringWithFormat:@"发布时间:%@",model.createTime];
    self.tyoelabel.text = [NSString stringWithFormat:@"%@",model.isExamine];
    if (model.isExamine.intValue == 1) {
        self.tyoelabel.text = @"已通过";
        self.tyoelabel.textColor = CYColor(100, 200, 100, 1);
    }
    if ((model.isExamine && model.isExamine.intValue == 0) || model.isExamine.intValue == 3){
        self.tyoelabel.text =@"未审核";
        self.tyoelabel.textColor = [UIColor orangeColor];
    }
    if (model.isExamine.intValue == -1) {
        self.tyoelabel.text = @"未通过";
        self.tyoelabel.textColor = [UIColor redColor];
    }
     if (model.isExamine.intValue) {
          self.tyoelabel.text = @"已撤销";
          self.tyoelabel.textColor = CYColor(116, 208, 122, 1);
     }
}

- (void)awakeFromNib {
    // Initialization code

    
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
